package com.etone.smartAudit.dto.certificate;

import com.baomidou.mybatisplus.annotation.TableField;
import com.etone.smartAudit.vo.FileVO;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import java.time.LocalDateTime;
import java.util.List;

@NoArgsConstructor
@AllArgsConstructor
@Builder
@Data
@ApiModel(value = "添加存证单dto")
public class AddCertificateDTO {

    @ApiModelProperty(value = "主键id，编辑时需要传")
    private Integer id;

    @ApiModelProperty(value = "针对不同意确认单重新生成一个确认单时使用，其他情况不填")
    private Integer lastFileId;

    @NotEmpty(message = "需求单名称不能为空")
    @ApiModelProperty(value = "需求单名称")
    @TableField("vcName")
    private String name;


    @NotEmpty(message = "选择关联的项目")
    @ApiModelProperty(value = "关联的项目id")
    @TableField("intTemId")
    private Integer itemId;


    @NotEmpty(message = "选择关联的群组")
    @ApiModelProperty(value = "关联的群组id")
    @TableField("intGroupId")
    private Integer groupId;

    @NotEmpty(message = "开始时间不能为空")
    @ApiModelProperty(value = "开始时间")
    @TableField("dtStartTime")
//    @JsonFormat(pattern = "yyyy-dd-MM HH:mm:ss")
    private LocalDateTime startTime;

    @NotEmpty(message = "结束时间不能为空")
    @ApiModelProperty(value = "结束时间")
    @TableField("dtEndTime")
    private LocalDateTime endTime;

    @ApiModelProperty(value = "发起人关联id")
    @TableField("intAdminId")
    private Integer adminId;

    @ApiModelProperty(value = "最后处理时间")
    @TableField("dtLastDate")
    private LocalDateTime lastDate;

    @ApiModelProperty(value = "执行人关联id", hidden = true)
    @TableField("intHandPersonId")
    private Integer handPersonId;


    @ApiModelProperty(value = "执行人关联人员信息id")
    private Integer handPersonInfoId;

    @ApiModelProperty(value = "多个执行人，多个以逗号隔开")
    private String handPersonInfoIds;

    @ApiModelProperty(value = "多个抄送人员，多个以逗号隔开")
    private String copySendPersonInfoIds;

    @ApiModelProperty(value = "区块链hash地址", hidden = true)
    @TableField("vcHashValue")
    private String hashValue;

    @ApiModelProperty(value = "存证单类型 1-需求单，2-确认单")
    @TableField("intType")
    private Integer type;

    @ApiModelProperty(value = "被审计单位关联id")
    @TableField("intAuditPositionId")
    private Integer auditPositionId;

    @ApiModelProperty(value = "被审计单位名称 ")
    @TableField("vcAuditPosition")
    private String auditposition;

    @ApiModelProperty(value = " 被审计接口人;被审计人接口id ")
    @TableField("intAuditAdminId")
    private Integer auditadminid;

    //---------------------------------------
    @ApiModelProperty(value = "问题依据 ")
    @TableField("vcQuestion")
    private String question;

    @ApiModelProperty(value = "内容描述 ")
    @TableField("vcContent")
    private String content;

    @ApiModelProperty(value = "审核人 ")
    @TableField("intAuditPersonId")
    private Integer auditPersonId;

    @ApiModelProperty(value = "事务所组长 ")
    @TableField("intLeaderAdminId")
    private Integer leaderAdminId;

    @ApiModelProperty(value = "质检员 ")
    @TableField("intCheckAdminId")
    private Integer checkAdminId;

    @ApiModelProperty("审计成员id集合")
    private List<Integer> autditPersons;

    @ApiModelProperty("数据文件")
    private String data;

    @ApiModelProperty(value = "复核人员id,确认单使用")
    private Integer recheckAdminId;


    @ApiModelProperty(value = "复核日期")
    @TableField("dtRecheckedTime")
    private LocalDateTime recheckedTime;

    @ApiModelProperty(value = "关联的事物所id")
    @TableField("intTranstraId")
    private Integer transtraId;


    @ApiModelProperty(value = "事项涉及专业部门")
    private String depart;

    @ApiModelProperty("文件附件")
    private List<FileVO> files;

    @ApiModelProperty("执行人版本,从1开始")
    private Integer handVersion;
}
